package com.jiali.backend.controller;


import com.jiali.backend.common.ResponseResult;
import com.jiali.backend.model.ServiceItem;
import com.jiali.backend.service.ServiceItemService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/service")
public class ServiceItemController {
    // 注入ServiceItemService
    @Resource
    private ServiceItemService serviceItemService;
    // 查询服务列表
    @GetMapping("/list")
    public ResponseResult<List<ServiceItem>> getAllServices() {
        return serviceItemService.getServiceList();
    }
}
